var otel = document.querySelector(".loginbar-footer-a");
var opass = document.querySelector(".loginbar-footer-b");
var obtn = document.querySelector(".loginbar-footer-c")
var obtn1 = document.querySelector(".loginbar-footer-c2")
var aFlag = pFlag = false 

otel.onblur = function(){
    // if(otel.value === "")return;
    var reg =  /^1[3-9]\d{9}$/;
    if(otel.value === "")return;
    if(reg.test(this.value)){
        this.nextElementSibling.innerHTML = "√";
        aFlag = true;
    }else{
        this.nextElementSibling.innerHTML = "X";
        aFlag =false
    }
} 
opass.onblur = function(){
    var reg = /^[a-z0-9A-Z_]{4,20}$/;
    if(opass.value === "")return;
    if(reg.test(this.value)){
        // this.nextElementSibling.innerHTML = "√";
        pFlag = true;

    }else{
        // this.nextElementSibling.innerHTML = "X";
        
        pFlag = false;
    }   
}


//短信登录
var obox3 = document.querySelector(".loginba-top-a")
console.log(obox3)
//验证码
var ocont = document.querySelector(".loginbar-b2")
console.log(ocont)


//账号
var obox2 = document.querySelector(".loginba-top-b2")

// 密码
var ocont1 = document.querySelector(".loginbar-b")



obox3.onclick = function(){
    ocont.style.display = "block";      
    // ocont.style.display = "none"; 
}
obox2.onclick = function(){
    ocont.style.display = "none";      
    // ocont.style.display = "none"; 
}